import request from '@/config/http.js'

export function lists(params) {
  return request({
    url: 'editroom/pgmdetail',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: 'editroom/pgmdetail',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: 'editroom/pgmdetail',
    method: 'put',
    data
  })
}

export function del(ids) {
  return request({
    url: 'editroom/pgmdetail',
    method: 'delete',
    data: ids
  })
}

export function channelpgm(params) {
  return request({
    url: 'editroom/pgmchannel',
    method: 'get',
    params
  })
}

export function channelpgmAdd(data) {
  return request({
    url: 'editroom/pgmchannel',
    method: 'post',
    data
  })
}

export function channelpgmCheck(data) {
  return request({
    url: 'editroom/pgmchannelCheck',
    method: 'post',
    data
  })
}

export function channelpgmEdit(data) {
  return request({
    url: 'editroom/pgmchannel',
    method: 'put',
    data
  })
}

export function channelpgmDel(ids) {
  return request({
    url: 'editroom/pgmchannel',
    method: 'delete',
    data: ids
  })
}

// 播出串联单获取编单日期列表
export function pgmplayDateList(params) {
  return request({
    url: 'playeditroom/pgmplaydatelist',
    method: 'get',
    params
  })
}

// 播出串联单编单日期创建
export function pgmplayDateAdd(data) {
  return request({
    url: 'playeditroom/pgmplaydateadd',
    method: 'post',
    data
  })
}

export function playchannelpgmDel(ids) {
  return request({
    url: 'playeditroom/playchannelpgm',
    method: 'delete',
    data: ids
  })
}

// 播出串联单频道编单列表
export function playchannelpgm(params) {
  return request({
    url: 'playeditroom/playchannelpgm',
    method: 'get',
    params
  })
}

export function playchannelDetail(params) {
  return request({
    url: 'playeditroom/playchanneldetail',
    method: 'get',
    params
  })
}

export function pgmPlayState(params) {
  return request({
    url: 'playeditroom/pgmplaystate',
    method: 'get',
    params
  })
}

export function pgmPlayAdd(data) {
  return request({
    url: 'playeditroom/pgmdetail',
    method: 'post',
    data
  })
}

export function pgmPlayDel(ids) {
  return request({
    url: 'playeditroom/pgmdetail',
    method: 'delete',
    data: ids
  })
}

export default {
  lists,
  add,
  edit,
  del,
  channelpgm,
  channelpgmAdd,
  channelpgmCheck,
  channelpgmEdit,
  channelpgmDel,
  pgmplayDateList,
  pgmplayDateAdd,
  playchannelpgm,
  playchannelpgmDel,
  playchannelDetail,
  pgmPlayAdd,
  pgmPlayDel
}
